package test;

import java.util.Scanner;

public class TengXun {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String input = scanner.next();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
            if (i != k - 1){
                System.out.print(arr[i] + " ");
            }
        }
    }

}
class Node{
    int val;
    Node next;
    public Node(int val){
        this.val = val;
    }
}
